import request from '@/utils/request'

//从配置中获取业务的地址
import {baseUrlConfig} from '@/config/config'
const basePath = baseUrlConfig.businessBaseUrl

// const basePath = 'http://10.7.52.150:8101'

interface Order {
    column: String;
    method: String;
}

export interface PageListType {
    pageNum?: number;
    pageSize?: number;
    condition?:{
    }
  }

// 获取分页列表
export const terminalPageList: (data: any) => Promise<[]> = (data) => {
    return request({
      url: basePath + '/markinfo/find/page',
      method: 'post',
      data
    })
  }
  
  // 新增
  export const terminalAdd = (data: any) => {
    return request({
      url: basePath + '/markinfo/append',
      method: 'post',
      data
    })
  }
  
  // 删除
  export const terminalDelete = (data: any) => {
      console.log(data);
    return request({
      url: basePath + `/markinfo/delete?id=${data}`,
      method: 'get'
    })
  }
  
  // 修改
  export const terminalUpdate = (data: any) => {
    return request({
      url: basePath + '/markinfo/update',
      method: 'post',
      data
    })
  }

  // 进港人口统计
  export const selectarrival = () => {
    return request({
      url: basePath + '/markinfo/selectarrival',
      method: 'post',
    })
  }

  // 进港人口统计
  export const selectdeparture = () => {
    return request({
      url: basePath + '/markinfo/selectdeparture',
      method: 'post',
    })
  }

  //树状图数量统计
  export const FlightResources = () => {
    return request({
      url: basePath + '/markinfo/FlightResources',
      method: 'post',
    })
  }

  //环状图数量统计
  export const selectFlight = () => {
    return request({
      url: basePath + '/markinfo/selectFlight',
      method: 'post',
    })
  }